Skip to content

feat: add Cambricon RMSNorm#19

Merged
voltjia merged 8 commits intofeat/dev-infrafrom
feat/dev-rmsnorm-cambricon
Mar 26, 2026
Merged

feat: add Cambricon RMSNorm#19
voltjia merged 8 commits intofeat/dev-infrafrom
feat/dev-rmsnorm-cambricon

Conversation

@bitzyz
Copy link
Copy Markdown

@bitzyz bitzyz commented Mar 12, 2026

  1. ✅Modified data_type.h to support low precision WITH_CAMBRICON
  2. ✅ Added rmsnorm cambricon op in src/cambricon/rms_norm
  3. ✅ Modified CMakeLists.txt to correctly handle .mlu files (using cncc compiler)
  4. ✅ Added definition for NRAM_MAX_SIZE
  5. ✅ Added definition for sumInternal function
  6. ✅ Used BANG macro for conditional compilation of MLU-specific code
  7. ✅ Fixed member initialization order in base/rms_norm.h

@bitzyz bitzyz self-assigned this Mar 12, 2026
@bitzyz bitzyz force-pushed the feat/dev-rmsnorm-cambricon branch 3 times, most recently from 7655800 to 35e2a2a Compare March 13, 2026 03:35
@bitzyz
Copy link
Copy Markdown
Author

bitzyz commented Mar 13, 2026

image

@bitzyz bitzyz force-pushed the feat/dev-rmsnorm-cambricon branch from 482aa74 to 0a49972 Compare March 16, 2026 06:36
@bitzyz bitzyz requested a review from voltjia March 16, 2026 06:38
@bitzyz bitzyz changed the title feat: add op on cambricon impl feat: add rmsnorm op on cambricon impl Mar 16, 2026
@bitzyz bitzyz force-pushed the feat/dev-rmsnorm-cambricon branch 3 times, most recently from 1449203 to c811f43 Compare March 19, 2026 03:20
@voltjia voltjia force-pushed the feat/dev-rmsnorm-cambricon branch from c811f43 to 1d6fe71 Compare March 20, 2026 09:53
@voltjia
Copy link
Copy Markdown
Collaborator

voltjia commented Mar 24, 2026

NVIDIA

Looking in indexes: https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
Processing /home/huangjiacheng/InfiniOps
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: InfiniOps
  Building wheel for InfiniOps (pyproject.toml): started
  Building wheel for InfiniOps (pyproject.toml): finished with status 'done'
  Created wheel for InfiniOps: filename=infiniops-0.1.0-cp310-cp310-linux_x86_64.whl size=391134 sha256=8c29800c01d85af8ab99748ab120211b19d524ea6f86e835bac6ce927efde0f0
  Stored in directory: /tmp/pip-ephem-wheel-cache-fu5w4g0o/wheels/b5/f3/6e/961028f73a2712eb7b753a23bdd1baaa714e27760fd92de56c
Successfully built InfiniOps
Installing collected packages: InfiniOps
  Attempting uninstall: InfiniOps
    Found existing installation: InfiniOps 0.1.0
    Uninstalling InfiniOps-0.1.0:
      Successfully uninstalled InfiniOps-0.1.0
Successfully installed InfiniOps-0.1.0

[notice] A new release of pip is available: 25.3 -> 26.0.1
[notice] To update, run: pip install --upgrade pip
============================= test session starts ==============================
platform linux -- Python 3.10.16, pytest-9.0.2, pluggy-1.6.0
rootdir: /home/huangjiacheng/InfiniOps
configfile: pyproject.toml
testpaths: tests
plugins: anyio-4.12.1, xdist-3.8.0, cov-7.0.0, typeguard-4.4.4
collected 3372 items

tests/test_add.py ...................................................... [  1%]
........................................................................ [  3%]
........................................................................ [  5%]
..................                                                       [  6%]
tests/test_causal_softmax.py ....................................        [  7%]
tests/test_gemm.py ..................................................... [  9%]
........................................................................ [ 11%]
........................................................................ [ 13%]
........................................................................ [ 15%]
........................................................................ [ 17%]
........................................................................ [ 19%]
........................................................................ [ 21%]
........................................................................ [ 23%]
........................................................................ [ 26%]
........................................................................ [ 28%]
........................................................................ [ 30%]
........................................................................ [ 32%]
........................................................................ [ 34%]
........................................................................ [ 36%]
........................................................................ [ 38%]
........................................................................ [ 41%]
........................................................................ [ 43%]
........................................................................ [ 45%]
........................................................................ [ 47%]
........................................................................ [ 49%]
........................................................................ [ 51%]
........................................................................ [ 53%]
........................................................................ [ 56%]
........................................................................ [ 58%]
........................................................................ [ 60%]
........................................................................ [ 62%]
........................................................................ [ 64%]
........................................................................ [ 66%]
........................................................................ [ 68%]
........................................................................ [ 70%]
........................................................................ [ 73%]
........................................................................ [ 75%]
........................................................................ [ 77%]
........................................................................ [ 79%]
........................................................................ [ 81%]
........................................................................ [ 83%]
........................................................................ [ 85%]
........................................................................ [ 88%]
........................................................................ [ 90%]
........................................................................ [ 92%]
........................................................................ [ 94%]
...................................................................      [ 96%]
tests/test_rms_norm.py ................................................. [ 97%]
.......................                                                  [ 98%]
tests/test_swiglu.py ................................................    [100%]

======================= 3372 passed in 260.96s (0:04:20) =======================

MetaX

WARNING: The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Looking in indexes: https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
Processing ./.
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: InfiniOps
  Building wheel for InfiniOps (pyproject.toml): started
  Building wheel for InfiniOps (pyproject.toml): finished with status 'done'
  Created wheel for InfiniOps: filename=infiniops-0.1.0-cp310-cp310-linux_x86_64.whl size=715997 sha256=77db25370cafaa85afd7734b9ec3f3fa1167bdb96758f862dd99118f7505cd49
  Stored in directory: /tmp/pip-ephem-wheel-cache-9dcyxl0l/wheels/b5/f3/6e/961028f73a2712eb7b753a23bdd1baaa714e27760fd92de56c
Successfully built InfiniOps
Installing collected packages: InfiniOps
  Attempting uninstall: InfiniOps
    Found existing installation: InfiniOps 0.1.0
    Uninstalling InfiniOps-0.1.0:
      Successfully uninstalled InfiniOps-0.1.0
Successfully installed InfiniOps-0.1.0
============================= test session starts ==============================
platform linux -- Python 3.10.20, pytest-8.4.1, pluggy-1.6.0
rootdir: /home/huangjiacheng/InfiniOps
configfile: pyproject.toml
testpaths: tests
collected 3372 items

tests/test_add.py ...................................................... [  1%]
........................................................................ [  3%]
........................................................................ [  5%]
..................                                                       [  6%]
tests/test_causal_softmax.py ....................................        [  7%]
tests/test_gemm.py ..................................................... [  9%]
........................................................................ [ 11%]
........................................................................ [ 13%]
........................................................................ [ 15%]
........................................................................ [ 17%]
........................................................................ [ 19%]
........................................................................ [ 21%]
........................................................................ [ 23%]
........................................................................ [ 26%]
........................................................................ [ 28%]
........................................................................ [ 30%]
........................................................................ [ 32%]
........................................................................ [ 34%]
........................................................................ [ 36%]
........................................................................ [ 38%]
........................................................................ [ 41%]
........................................................................ [ 43%]
........................................................................ [ 45%]
........................................................................ [ 47%]
........................................................................ [ 49%]
........................................................................ [ 51%]
........................................................................ [ 53%]
........................................................................ [ 56%]
........................................................................ [ 58%]
........................................................................ [ 60%]
........................................................................ [ 62%]
........................................................................ [ 64%]
........................................................................ [ 66%]
........................................................................ [ 68%]
........................................................................ [ 70%]
........................................................................ [ 73%]
........................................................................ [ 75%]
........................................................................ [ 77%]
........................................................................ [ 79%]
........................................................................ [ 81%]
........................................................................ [ 83%]
........................................................................ [ 85%]
........................................................................ [ 88%]
........................................................................ [ 90%]
........................................................................ [ 92%]
........................................................................ [ 94%]
...................................................................      [ 96%]
tests/test_rms_norm.py ................................................. [ 97%]
.......................                                                  [ 98%]
tests/test_swiglu.py ................................................    [100%]

======================= 3372 passed in 311.44s (0:05:11) =======================

Iluvatar

WARNING: The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Looking in indexes: https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
Processing ./.
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: InfiniOps
  Building wheel for InfiniOps (pyproject.toml): started
  Building wheel for InfiniOps (pyproject.toml): finished with status 'done'
  Created wheel for InfiniOps: filename=infiniops-0.1.0-cp310-cp310-linux_x86_64.whl size=335559 sha256=29e0f38b6c8c073faf6d8f1cfef452b035620ddf7b297ebc96eb8e06b5a9b58a
  Stored in directory: /tmp/pip-ephem-wheel-cache-6ytj2fc3/wheels/b5/f3/6e/961028f73a2712eb7b753a23bdd1baaa714e27760fd92de56c
Successfully built InfiniOps
Installing collected packages: InfiniOps
  Attempting uninstall: InfiniOps
    Found existing installation: InfiniOps 0.1.0
    Uninstalling InfiniOps-0.1.0:
      Successfully uninstalled InfiniOps-0.1.0
Successfully installed InfiniOps-0.1.0
============================= test session starts ==============================
platform linux -- Python 3.10.19, pytest-9.0.2, pluggy-1.6.0
rootdir: /home/huangjiacheng/InfiniOps
configfile: pyproject.toml
testpaths: tests
plugins: anyio-4.9.0, cov-7.0.0, xdist-3.8.0
collected 3372 items

tests/test_add.py ...................................................... [  1%]
........................................................................ [  3%]
........................................................................ [  5%]
..................                                                       [  6%]
tests/test_causal_softmax.py ....................................        [  7%]
tests/test_gemm.py ..................................................... [  9%]
........................................................................ [ 11%]
........................................................................ [ 13%]
........................................................................ [ 15%]
........................................................................ [ 17%]
........................................................................ [ 19%]
........................................................................ [ 21%]
........................................................................ [ 23%]
........................................................................ [ 26%]
........................................................................ [ 28%]
........................................................................ [ 30%]
........................................................................ [ 32%]
........................................................................ [ 34%]
........................................................................ [ 36%]
........................................................................ [ 38%]
........................................................................ [ 41%]
........................................................................ [ 43%]
........................................................................ [ 45%]
........................................................................ [ 47%]
........................................................................ [ 49%]
........................................................................ [ 51%]
........................................................................ [ 53%]
........................................................................ [ 56%]
........................................................................ [ 58%]
........................................................................ [ 60%]
........................................................................ [ 62%]
........................................................................ [ 64%]
........................................................................ [ 66%]
........................................................................ [ 68%]
........................................................................ [ 70%]
........................................................................ [ 73%]
........................................................................ [ 75%]
........................................................................ [ 77%]
........................................................................ [ 79%]
........................................................................ [ 81%]
........................................................................ [ 83%]
........................................................................ [ 85%]
........................................................................ [ 88%]
........................................................................ [ 90%]
........................................................................ [ 92%]
........................................................................ [ 94%]
...................................................................      [ 96%]
tests/test_rms_norm.py ................................................. [ 97%]
.......................                                                  [ 98%]
tests/test_swiglu.py ................................................    [100%]

======================= 3372 passed in 242.95s (0:04:02) =======================

Moore

WARNING: The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing ./.
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: InfiniOps
  Building wheel for InfiniOps (pyproject.toml): started
  Building wheel for InfiniOps (pyproject.toml): finished with status 'done'
  Created wheel for InfiniOps: filename=infiniops-0.1.0-cp310-cp310-linux_x86_64.whl size=344617 sha256=5d5568d49ae55ed475663c754b72961730f50db84f66071a32f01f5ed0eefedb
  Stored in directory: /tmp/pip-ephem-wheel-cache-ovgmerxc/wheels/b5/f3/6e/961028f73a2712eb7b753a23bdd1baaa714e27760fd92de56c
Successfully built InfiniOps
Installing collected packages: InfiniOps
  Attempting uninstall: InfiniOps
    Found existing installation: InfiniOps 0.1.0
    Uninstalling InfiniOps-0.1.0:
      Successfully uninstalled InfiniOps-0.1.0
Successfully installed InfiniOps-0.1.0
============================= test session starts ==============================
platform linux -- Python 3.10.20, pytest-7.2.2, pluggy-1.6.0
rootdir: /home/huangjiacheng/InfiniOps, configfile: pyproject.toml, testpaths: tests
plugins: cov-7.0.0, xdist-3.8.0, hypothesis-6.145.0, anyio-4.10.0
collected 3372 items

tests/test_add.py ...................................................... [  1%]
........................................................................ [  3%]
......................................................ssssssssssssssssss [  5%]
ssssssssssssssssss                                                       [  6%]
tests/test_causal_softmax.py ..................Fatal Python error: Segmentation fault

Current thread 0x00007fce511a0740 (most recent call first):
  File "/home/huangjiacheng/InfiniOps/tests/test_causal_softmax.py", line 43 in _causal_softmax
  File "/home/huangjiacheng/InfiniOps/tests/conftest.py", line 80 in pytest_pyfunc_call
  File "/usr/local/lib/python3.10/dist-packages/pluggy/_callers.py", line 121 in _multicall
  File "/usr/local/lib/python3.10/dist-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/local/lib/python3.10/dist-packages/pluggy/_hooks.py", line 512 in __call__
  File "/usr/local/lib/python3.10/dist-packages/_pytest/python.py", line 1789 in runtest
  File "/usr/local/lib/python3.10/dist-packages/_pytest/runner.py", line 167 in pytest_runtest_call
  File "/usr/local/lib/python3.10/dist-packages/pluggy/_callers.py", line 121 in _multicall
  File "/usr/local/lib/python3.10/dist-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/local/lib/python3.10/dist-packages/pluggy/_hooks.py", line 512 in __call__
  File "/usr/local/lib/python3.10/dist-packages/_pytest/runner.py", line 260 in <lambda>
  File "/usr/local/lib/python3.10/dist-packages/_pytest/runner.py", line 339 in from_call
  File "/usr/local/lib/python3.10/dist-packages/_pytest/runner.py", line 259 in call_runtest_hook
  File "/usr/local/lib/python3.10/dist-packages/_pytest/runner.py", line 220 in call_and_report
  File "/usr/local/lib/python3.10/dist-packages/_pytest/runner.py", line 131 in runtestprotocol
  File "/usr/local/lib/python3.10/dist-packages/_pytest/runner.py", line 112 in pytest_runtest_protocol
  File "/usr/local/lib/python3.10/dist-packages/pluggy/_callers.py", line 121 in _multicall
  File "/usr/local/lib/python3.10/dist-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/local/lib/python3.10/dist-packages/pluggy/_hooks.py", line 512 in __call__
  File "/usr/local/lib/python3.10/dist-packages/_pytest/main.py", line 349 in pytest_runtestloop
  File "/usr/local/lib/python3.10/dist-packages/pluggy/_callers.py", line 121 in _multicall
  File "/usr/local/lib/python3.10/dist-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/local/lib/python3.10/dist-packages/pluggy/_hooks.py", line 512 in __call__
  File "/usr/local/lib/python3.10/dist-packages/_pytest/main.py", line 324 in _main
  File "/usr/local/lib/python3.10/dist-packages/_pytest/main.py", line 270 in wrap_session
  File "/usr/local/lib/python3.10/dist-packages/_pytest/main.py", line 317 in pytest_cmdline_main
  File "/usr/local/lib/python3.10/dist-packages/pluggy/_callers.py", line 121 in _multicall
  File "/usr/local/lib/python3.10/dist-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/local/lib/python3.10/dist-packages/pluggy/_hooks.py", line 512 in __call__
  File "/usr/local/lib/python3.10/dist-packages/_pytest/config/__init__.py", line 167 in main
  File "/usr/local/lib/python3.10/dist-packages/_pytest/config/__init__.py", line 190 in console_main
  File "/usr/local/lib/python3.10/dist-packages/pytest/__main__.py", line 5 in <module>
  File "/home/huangjiacheng/.local/share/uv/python/cpython-3.10-linux-x86_64-gnu/lib/python3.10/runpy.py", line 86 in _run_code
  File "/home/huangjiacheng/.local/share/uv/python/cpython-3.10-linux-x86_64-gnu/lib/python3.10/runpy.py", line 196 in _run_module_as_main

Extension modules: numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, torch._C, torch._C._dynamo.autograd_compiler, torch._C._dynamo.eval_frame, torch._C._dynamo.guards, torch._C._dynamo.utils, torch._C._fft, torch._C._linalg, torch._C._nested, torch._C._nn, torch._C._sparse, torch._C._special, torch_musa._MUSAC, markupsafe._speedups (total: 26)

Cambricon

WARNING: The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
WARNING: Ignoring invalid distribution -orch (/home/huangjiacheng/.venv/lib/python3.10/site-packages)
Looking in indexes: https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
Processing ./.
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: InfiniOps
  Building wheel for InfiniOps (pyproject.toml): started
  Building wheel for InfiniOps (pyproject.toml): finished with status 'done'
  Created wheel for InfiniOps: filename=infiniops-0.1.0-cp310-cp310-linux_aarch64.whl size=175482 sha256=efe67dcb8982e6996bb1b3d329a6040a44bdd3225b1876b3da75d3a5ef643abb
  Stored in directory: /tmp/pip-ephem-wheel-cache-z9s23za6/wheels/b5/f3/6e/961028f73a2712eb7b753a23bdd1baaa714e27760fd92de56c
Successfully built InfiniOps
WARNING: Ignoring invalid distribution -orch (/home/huangjiacheng/.venv/lib/python3.10/site-packages)
Installing collected packages: InfiniOps
  Attempting uninstall: InfiniOps
    Found existing installation: InfiniOps 0.1.0
    Uninstalling InfiniOps-0.1.0:
      Successfully uninstalled InfiniOps-0.1.0
WARNING: Ignoring invalid distribution -orch (/home/huangjiacheng/.venv/lib/python3.10/site-packages)
Successfully installed InfiniOps-0.1.0
============================= test session starts ==============================
platform linux -- Python 3.10.20, pytest-9.0.2, pluggy-1.6.0
rootdir: /home/huangjiacheng/InfiniOps
configfile: pyproject.toml
testpaths: tests
plugins: xdist-3.8.0, cov-7.0.0, hypothesis-6.135.14
collected 3300 items

tests/test_add.py ...................................................... [  1%]
..................Fatal Python error: Segmentation fault

Current thread 0x0000fffe3a5a5090 (most recent call first):
  File "/home/huangjiacheng/InfiniOps/tests/test_add.py", line 66 in _add
  File "/home/huangjiacheng/InfiniOps/tests/conftest.py", line 80 in pytest_pyfunc_call
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 121 in _multicall
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 512 in __call__
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/_pytest/python.py", line 1720 in runtest
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/_pytest/runner.py", line 179 in pytest_runtest_call
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 121 in _multicall
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 512 in __call__
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/_pytest/runner.py", line 245 in <lambda>
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/_pytest/runner.py", line 353 in from_call
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/_pytest/runner.py", line 244 in call_and_report
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/_pytest/runner.py", line 137 in runtestprotocol
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/_pytest/runner.py", line 118 in pytest_runtest_protocol
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 121 in _multicall
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 512 in __call__
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/_pytest/main.py", line 396 in pytest_runtestloop
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 121 in _multicall
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 512 in __call__
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/_pytest/main.py", line 372 in _main
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/_pytest/main.py", line 318 in wrap_session
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/_pytest/main.py", line 365 in pytest_cmdline_main
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 121 in _multicall
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 512 in __call__
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 199 in main
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 223 in console_main
  File "/home/huangjiacheng/.venv/lib/python3.10/site-packages/pytest/__main__.py", line 9 in <module>
  File "/home/huangjiacheng/.local/share/uv/python/cpython-3.10-linux-aarch64-gnu/lib/python3.10/runpy.py", line 86 in _run_code
  File "/home/huangjiacheng/.local/share/uv/python/cpython-3.10-linux-aarch64-gnu/lib/python3.10/runpy.py", line 196 in _run_module_as_main

Extension modules: numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, torch._C, torch._C._fft, torch._C._linalg, torch._C._nested, torch._C._nn, torch._C._sparse, torch._C._special, torch_mlu._MLUC, pandas._libs.tslibs.ccalendar, pandas._libs.tslibs.np_datetime, pandas._libs.tslibs.dtypes, pandas._libs.tslibs.base, pandas._libs.tslibs.nattype, pandas._libs.tslibs.timezones, pandas._libs.tslibs.fields, pandas._libs.tslibs.timedeltas, pandas._libs.tslibs.tzconversion, pandas._libs.tslibs.timestamps, pandas._libs.properties, pandas._libs.tslibs.offsets, pandas._libs.tslibs.strptime, pandas._libs.tslibs.parsing, pandas._libs.tslibs.conversion, pandas._libs.tslibs.period, pandas._libs.tslibs.vectorized, pandas._libs.ops_dispatch, pandas._libs.missing, pandas._libs.hashtable, pandas._libs.algos, pandas._libs.interval, pandas._libs.lib, pandas._libs.ops, pandas._libs.hashing, pandas._libs.arrays, pandas._libs.tslib, pandas._libs.sparse, pandas._libs.internals, pandas._libs.indexing, pandas._libs.index, pandas._libs.writers, pandas._libs.join, pandas._libs.window.aggregations, pandas._libs.window.indexers, pandas._libs.reshape, pandas._libs.groupby, pandas._libs.json, pandas._libs.parsers, pandas._libs.testing (total: 61)

@bitzyz
Copy link
Copy Markdown
Author

bitzyz commented Mar 24, 2026

image

@bitzyz bitzyz force-pushed the feat/dev-rmsnorm-cambricon branch from c913436 to fc3b3e5 Compare March 25, 2026 08:12
@bitzyz
Copy link
Copy Markdown
Author

bitzyz commented Mar 25, 2026

image

@bitzyz bitzyz force-pushed the feat/dev-rmsnorm-cambricon branch 2 times, most recently from d994c81 to 0890074 Compare March 25, 2026 08:48
@voltjia voltjia force-pushed the feat/dev-rmsnorm-cambricon branch from 0890074 to 0f75eba Compare March 25, 2026 09:05
@voltjia
Copy link
Copy Markdown
Collaborator

voltjia commented Mar 25, 2026

<== FAIL  moore_gpu      (35s)
--- error output (last 50 lines) ---
          -- Found OpenMP_CXX: -fopenmp (found version "4.5")
          -- Found OpenMP: TRUE (found version "4.5")
          -- Found Python: /usr/bin/python (found version "3.10.12") found components: Interpreter
          -- Generating wrappers - done
          -- Found Python: /usr/bin/python (found version "3.10.12") found components: Interpreter Development Development.Module Development.Embed
          -- Performing Test HAS_FLTO_AUTO
          -- Performing Test HAS_FLTO_AUTO - Success
          -- Found pybind11: /usr/local/lib/python3.10/dist-packages/pybind11/include (found version "3.0.1")
          -- Configuring done (10.8s)
          -- Generating done (0.0s)
          -- Build files have been written to: /tmp/tmp9eimmzl8/build
          *** Building project with Ninja...
          [0/2] Re-checking globbed directories...
          [1/10] Building CXX object src/CMakeFiles/ops.dir/__/generated/bindings/ops.cc.o
          FAILED: src/CMakeFiles/ops.dir/__/generated/bindings/ops.cc.o
          /workspace/repo/scripts/mcc_wrapper.sh -DWITH_CPU=1 -DWITH_MOORE=1 -Dops_EXPORTS -I/workspace/repo/src -I/usr/local/musa/include -I/workspace/repo -isystem /usr/include/python3.10 -isystem /usr/local/lib/python3.10/dist-packages/pybind11/include -O3 -DNDEBUG -std=gnu++17 -fPIC -fvisibility=hidden -x musa -MD -MT src/CMakeFiles/ops.dir/__/generated/bindings/ops.cc.o -MF src/CMakeFiles/ops.dir/__/generated/bindings/ops.cc.o.d -o src/CMakeFiles/ops.dir/__/generated/bindings/ops.cc.o -c /workspace/repo/generated/bindings/ops.cc
          In file included from /workspace/repo/generated/bindings/ops.cc:4:
          In file included from /workspace/repo/src/moore/add/kernel.h:14:
          In file included from /workspace/repo/src/cuda/add/kernel.h:6:
          In file included from /workspace/repo/src/base/add.h:6:
          In file included from /workspace/repo/src/operator.h:10:
          In file included from /workspace/repo/src/dispatcher.h:10:
          In file included from /workspace/repo/src/data_type.h:19:
          In file included from /usr/local/musa/include/musa_fp16.h:3540:
          /usr/local/musa/include/musa_fp16_mtgpu.h:1609:26: error: out-of-line declaration of 'hrcp' does not match any declaration in namespace 'infini::ops'
          inline __device__ __half hrcp(__half x);
                                   ^~~~
          /workspace/repo/src/moore/polyfills.cuh:39:27: note: expanded from macro 'hrcp'
          #define hrcp infini::ops::hrcp
                                    ^~~~
          1 error generated when compiling for mp_21.
          [2/10] Building CXX object examples/CMakeFiles/data_type.dir/data_type.cc.o
          [3/10] Building CXX object examples/CMakeFiles/tensor.dir/tensor.cc.o
          [4/10] Building CXX object src/CMakeFiles/infiniops.dir/tensor.cc.o
          [5/10] Building CXX object examples/CMakeFiles/gemm.dir/gemm/gemm.cc.o
          ninja: build stopped: subcommand failed.
          
          *** CMake build failed
          [end of output]
      
      note: This error originates from a subprocess, and is likely not a problem with pip.
      ERROR: Failed building wheel for InfiniOps
    Failed to build InfiniOps
    
    [notice] A new release of pip is available: 25.2 -> 26.0.1
    [notice] To update, run: python -m pip install --upgrade pip
    error: failed-wheel-build-for-install
    
    × Failed to build installable wheels for some pyproject.toml based projects
    ╰─> InfiniOps
---
<== PASS  iluvatar_gpu   (96s)
<== PASS  nvidia_gpu     (120s)
<== PASS  metax_gpu      (211s)
<== PASS  cambricon_gpu  (286s)

========== Failed ==========
  FAIL  moore_gpu  failure (35s)

@voltjia voltjia changed the title feat: add rmsnorm op on cambricon impl feat: add Cambricon RMSNorm Mar 26, 2026
@voltjia voltjia merged commit 8c92b2e into feat/dev-infra Mar 26, 2026
@voltjia voltjia deleted the feat/dev-rmsnorm-cambricon branch March 26, 2026 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants